/* 基本 navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
  background-color: #000 !important;
}

/* LOGO */
.navbar-brand {
  font-family: 'Noto Sans TC', sans-serif !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5em !important;
  margin-left: 20px !important;
  display: flex;
  align-items: center;
  white-space: nowrap; /* 防止換行 */
  flex-shrink: 0; /* 不縮小 */
}

/* LOGO 圖片 */
.navbar-brand img {
  height: 40px;
  margin-right: 20px;
  flex-shrink: 0;
}

/* 導覽內容容器 */
#templatemo_main_nav > div.container.d-flex.align-items-center.flex-nowrap.justify-content-between {
  width: 100%;
  overflow: visible !important;
  min-height: 64px; /* 固定橫幅高度 */
}

/* 導覽內容第二層容器 */
#templatemo_main_nav > div.container > div.d-flex.flex-column.flex-lg-row.align-items-lg-center.gap-4.ms-auto.text-end {
  flex-direction: row !important; /* 在大螢幕是排成一排 */
  flex-wrap: nowrap !important;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
}

/* 導覽選單 */
#templatemo_main_nav ul.navbar-nav {
  flex-direction: row !important;
  gap: 1.5rem;
  padding-left: 0px;
  margin-bottom: 0;
  white-space: nowrap;
  list-style: none;
  margin-right: 4rem; /* 導覽選單和社群按鈕間距 */
}

/* 下拉選單的父元素要相對定位 */
.navbar-nav li.nav-item.dropdown {
  position: relative;
}

/* 下拉選單容器，初始隱藏 */
.navbar-nav ul.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #000;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  min-width: 160px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  z-index: 10000;
  /* 移除 opacity 與 visibility */
}

.navbar-nav li.nav-item.dropdown:hover > ul.dropdown-menu {
  display: block;
}


/* 下拉選單裡的連結樣式 */
.navbar-nav ul.dropdown-menu li a.dropdown-item {
  display: block;
  padding: 0.5rem 1.5rem;
  color: rgb(255, 255, 255);
  text-decoration: none;
  white-space: nowrap;
}

/* 下拉選單連結 hover */
.navbar-nav ul.dropdown-menu li a.dropdown-item:hover {
  background-color: rgb(216, 48, 140);
  color: white;
}

/* nav-link 顏色與 hover */
.navbar-nav .nav-link {
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.navbar-nav .nav-link:hover {
  color: rgb(216, 48, 140) !important;
}

/* 社群按鈕容器 */
#templatemo_main_nav .d-flex.gap-3.justify-content-end {
  justify-content: flex-end;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2rem;
}

/* 社群按鈕圖示 */
#templatemo_main_nav .d-flex.gap-3.justify-content-end a i {
  color: white;
  transition: color 0.3s ease;
  font-size: 1.5rem;
}

#templatemo_main_nav .d-flex.gap-3.justify-content-end a:hover i {
  color: rgb(216, 48, 140) !important;
}

/* 語言切換按鈕容器 */
#language-switcher {
  font-weight: 600;
  user-select: none;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 語言按鈕 */
#language-switcher .lang-btn {
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
  padding: 0;
  margin: 0 0.3rem;
  white-space: nowrap;
  background: none;
  border: none;
}

/* 語言按鈕 hover */
#language-switcher .lang-btn:hover {
  color: rgb(216, 48, 140) !important;
}

/* 選中語言 */
#language-switcher .active-lang {
  color: rgb(216, 48, 140);
  cursor: default;
  text-decoration: none;
}

/* container 調整 */
.container.d-flex.align-items-center {
  max-width: 100% !important;
  padding-left: 1rem;
  padding-right: 1rem;
  position: relative;
  display: flex;
  align-items: center;
}

/* 移除 margin-left 過大 */
.button-margin-left {
  margin-left: 0 !important;
  max-width: none;
}

/* 手機板特化 */
/* 最大寬度 991.98px以下 */
@media (max-width: 991.98px) {
  .navbar-brand {
   font-size: 30px !important;
   letter-spacing: 0.3em !important;
   text-align: left;
 }
  /* 導覽容器保持一排不換行 */
  #templatemo_main_nav > div.container > div.d-flex.flex-column.flex-lg-row.align-items-lg-center.gap-4.ms-auto.text-end {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }

  /* 導覽選單隱藏 */
  #templatemo_main_nav ul.navbar-nav {
    display: none !important;
  }

  /* 社群按鈕隱藏 */
  #templatemo_main_nav .d-flex.gap-3.justify-content-end {
    display: none !important;
  }

  /* 語言切換按鈕隱藏 */
  #language-switcher {
    display: none !important;
  }
}

/*影片位置調整*/
  @media (max-width: 768px) {
    .video-top-spacing {
    margin-top: 110px;
}
    }

/*人設區*/
.banner-strip {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background-color: #ffbacc;
  height: 800px;
  overflow: hidden;
}

.banner-image {
  flex: 1;
  max-width: 50%;
  overflow: hidden;
}

.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 20px;
  box-sizing: border-box;
}

.banner-content {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 從頂部開始排列 */
  color: rgb(255, 255, 255);
}

/* text-block 容器樣式 */
.text-block {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* 移除任何可能影響排版的屬性 */
}

/* 標題樣式 - 使用 data-key 屬性選擇器 */
div[data-key="VTtitle"] { /* 修改了選擇器 */
    display: block;
    font-size: 48px !important;
    font-weight: 700 !important;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-align: left;
    flex-shrink: 0; /* 防止標題被壓縮 */
}

/* 內文樣式 - 使用 data-key 屬性選擇器 */
div[data-key="VTcontent"] { /* 修改了選擇器 */
    display: block;
    font-size: 22px !important;
    font-weight: 400 !important;
    color: #f0f0f0;
    line-height: 2;
    max-width: 1000px;
    text-align: left;
    overflow-y: none; /* 如果內容太多可以滾動 */
}

/* 響應式設計 - 手機版調整 */
@media (max-width: 768px) {
    .banner-strip {
        flex-direction: column;
        height: auto;
    }
    
    .banner-image {
        max-width: 100%;
        height: 300px;
    }
    
    .banner-content {
        padding: 20px;
    }
    
    div[data-key="VTtitle"] { 
        font-size: 1.6rem;
        text-align: center;
    }
    
    div[data-key="VTcontent"] { 
        font-size: 1rem;
        margin-bottom: 30px;
        text-align: center;
    }
}

/* 滾動觸發動畫效果 */
div[data-key="VTtitle"], 
div[data-key="VTcontent"] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

/* 當元素進入視窗時的動畫狀態 */
div[data-key="VTtitle"].animate, 
div[data-key="VTcontent"].animate {
  opacity: 1;
  transform: translateY(0);
}

/* 為內文添加延遲效果 */
div[data-key="VTcontent"].animate {
  transition-delay: 0.3s;
}
/*人設區結束*/

/*漫畫區開始*/
  /* 橫幅區塊樣式 */
  .comic { /* 將 .banner 替換為 .comic */
    background-color: #ffffff; /* 預設底色：鮮綠色 */
    padding: 20px 0; /* 上下內距，左右為0 */
    text-align: center; /* 文字水平置中 */
    margin-top: 30px;
   }

   /* 橫幅文字樣式 */
  .comic-text { /* 將 .banner-text 替換為 .comic-text */
     color: rgb(216, 48, 140);
    font-size: 48px !important;
    font-weight: 500 !important; /* 文字加粗 */
     margin: 0; /* 移除預設的段落外距 */
  }
.comic-thumbnails {
    display: flex;
    align-items: center;
    perspective: 1000px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 30px 20px 40px 20px; /* 上右下左 */
    box-sizing: border-box;
    z-index: 1;
}

.thumbnail-card {
    position: relative;
    width: 150px;
    height: 200px;
    margin-right: 10px;
    display: inline-block;
    transition: transform 0.3s ease, z-index 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    z-index: 1;
}

.thumbnail-card:hover {
    transform: translateY(-20px) scale(1.1);
    z-index: 10;
}

.thumbnail-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 為了讓滾動條更好看*/
.comic-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.comic-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.comic-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.comic-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.comic-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* 半透明黑色背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 確保在最上層 */
}

.viewer-content {
    display: flex;
    gap: 20px; /* 兩頁之間的間距 */
    max-width: 90%; /* 限制閱覽寬度 */
    max-height: 90%; /* 限制閱覽高度 */
    justify-content: center;
    align-items: center;
}

.viewer-content img {
    max-width: 48%; /* 讓兩頁各佔約一半寬度 */
    max-height: 100%;
    object-fit: contain; /* 保持圖片比例 */
    cursor: pointer; /* 表示可點擊 */
}

/* 手機樣式 */
@media (max-width: 767px) {
    .comic-thumbnails {
        padding: 10px;
        /* 可選：為了讓滾動更流暢，可以啟用滾動吸附 */
        scroll-snap-type: x mandatory;
    }

    .thumbnail-card {
        width: 120px; /* 調整卡片寬度，讓幾張卡片可以並列顯示並滑動 */
        height: 160px; /* 保持比例 */
        margin-right: 10px; /* 間距 */
        flex-shrink: 0; /* 防止卡片在 flex 容器中縮小 */
        /* 可選：滾動吸附到卡片邊緣 */
        scroll-snap-align: start;
    }

    .thumbnail-card:hover {
        /* 在觸控裝置上禁用 hover 效果，避免不預期的行為 */
        transform: none;
        z-index: 1;
    }

    .viewer-content {
        flex-direction: row; /* 保持橫向排列，但因為只顯示一頁，會自動居中 */
        gap: 0; /* 單頁模式下移除間距 */
        max-width: 100%; /* 最大化閱覽內容寬度 */
        max-height: 100%; /* 最大化閱覽內容高度 */
    }

    .viewer-content img {
        max-width: 95%; /* 讓單張圖片佔據螢幕大部分寬度 */
        max-height: 95%;
        object-fit: contain;
    }
}

/* 平板樣式 (可選，保持原有設置或根據需要調整) */
@media (min-width: 768px) and (max-width: 1023px) {
    .thumbnail-card {
        width: 120px;
        height: 160px;
    }
}
/*漫畫區結束*/

/*底部*/
#custom_footer {
    padding-top: 0px;
    padding-bottom: 60px;
    background-color: #111827;
    color: #dcdde1;
}

#custom_footer .container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 1140px;
    margin: 0 auto;
}

#custom_footer h5 {
    margin-bottom: 20px;
    color: white;
    font-weight: 500;
}

#custom_footer ul.custom-footer-link-list li {
    padding-top: 10px;
}

#custom_footer a {
    color: #dcdde1;
    text-decoration: none;
}

#custom_footer a:hover {
    color: rgb(216, 48, 140);
}

#custom_footer .copyright-area {
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center;     /* 垂直置中 */
    height: 50px;            /* 高度可自行調整 */
    margin-top: 10px;
}

#custom_footer .border-light {
    border-color: #ffffff !important;
}

#custom_footer .bg-black {
    background-color: #474747 !important;
}

#custom_footer .pt-5 {
    padding-top: 3rem;
}

#custom_footer ul.footer-icons li {
    margin-right: 10px;
}

#custom_footer .col-md-4 {
    padding-bottom: 2rem;
}

#custom_footer p,
#custom_footer li,
#custom_footer a {
    font-size: 16px;
    line-height: 1.6;
}
